package com.start_eternity.oasissafewalk.comment;


/**
 * author:ZhangT
 * Date:2024 / 04 / 15 / 10:12
 * Description: 错误代码常量定义
 */

public enum ErrorCode {

    SUCCESS(200,"ok",""),
    NEED_CHECK(201,"需要审核",""),
    FAILURE(0,"失败",""),
    NO_DATA(0,"数据获取为空",""),
    PARAM_ERROR(0,"账号或密码错误",""),
    FAIL_ID(0,"根据该ID操作失败","ID不存在"),
    FAIL_TITLE(0,"根据该标题操作失败","标题不存在"),
    FAIL_INSERT(0,"插入操作失败",""),
    FAIL_UPDATE(0,"更新失败",""),
    FAIL_DELETE(0,"删除失败",""),;


    /**
     * 错误码
     */
    private final int code;

    /**
     * 错误码信息
     */
    private final String message;

    /**
     * 错误信息详细描述
     */
    private final String description;

    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getDescription() {
        return description;
    }
}
